package com.joker.aigc.chat.service;

import com.joker.aigc.chat.domain.entity.RoomFriend;
import com.baomidou.mybatisplus.extension.service.IService;
import com.joker.aigc.domain.entity.User;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author 20346
 * @description 针对表【room_friend(单聊房间表)】的数据库操作Service
 * @createDate 2023-12-17 11:26:08
 */
public interface RoomFriendService extends IService<RoomFriend> {


    /**
     * 根据key来获取 单聊房间的信息
     *
     * @param key
     * @return
     */
    RoomFriend getByKey(String key);


    /**
     * 禁用房间
     *
     * @param id
     */
    void restoreRoom(Long id);

    /**
     * 设置房间 正常
     *
     * @param key
     */
    void disableRoom(String key);


    /**
     * 根据房间号，来找到 房间信息
     *
     * @param roomIds
     * @return
     */
    List<RoomFriend> listByRoomIds(List<Long> roomIds);

    RoomFriend getRoomFriendByRoomId(Long roomID);


    Map<Long, User> getFriendRoomMap(List<Long> roomIds, Long uid);

    Set<Long> getFriendUidSet(Collection<RoomFriend> values, Long uid);

    Long getFriendUid(RoomFriend roomFriend, Long uid);


}
